gtk-demo: Tweak the new constraints demo
authorMatthias Clasen <mclasen@redhat.com>
Fri, 30 Oct 2020 16:33:59 +0000 (12:33 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 30 Oct 2020 19:04:13 +0000 (15:04 -0400)
With these somewhat random ordering changes, things get
closer to working the same as the code example. Still,
the guide doesn't work right.

demos/gtk-demo/constraints.ui

index 37a58ba87f903585b4fcd027100c462cb39edc2f..5011caf7a582de70c34e25d0130b7c8379c6adca 100644 (file)
                      nat-width="100" nat-height="10"
                      max-width="200" max-height="20"
                      strength="strong"/>
-              <constraint target="button1" target-attribute="start"
-                          relation="ge"
-                          constant="0"
-                          strength="required"/>
-              <constraint target="button1" target-attribute="top"
-                          relation="ge"
-                          constant="0"
-                          strength="required"/>
               <constraint target="button1" target-attribute="width"
                           relation="le"
                           constant="200"
                           relation="eq"
                           source="button2" source-attribute="start"
                           strength="required"/>
-              <constraint target="button2" target-attribute="end"
+              <constraint target="super" target-attribute="end"
                           relation="eq"
-                          source="super" source-attribute="end"
-                          constant="-8"
+                          source="button2" source-attribute="end"
+                          constant="8"
                           strength="required"/>
               <constraint target="super" target-attribute="start"
                           relation="eq"
                           source="button3" source-attribute="start"
                           constant="-8"
                           strength="required"/>
-              <constraint target="button3" target-attribute="end"
+              <constraint target="super" target-attribute="end"
                           relation="eq"
-                          source="super" source-attribute="end"
-                          constant="-8"
+                          source="button3" source-attribute="end"
+                          constant="8"
                           strength="required"/>
               <constraint target="super" target-attribute="top"
                           relation="eq"
                           relation="eq"
                           source="button2" source-attribute="height"
                           strength="required"/>
-              <constraint target="button3" target-attribute="bottom"
+              <constraint target="super" target-attribute="bottom"
                           relation="eq"
-                          source="super" source-attribute="bottom"
-                          constant="-8"
+                          source="button3" source-attribute="bottom"
+                          constant="8"
                           strength="required"/>
             </constraints>
           </object>